package cn.com.ege.mvc.service.impl.business;

import java.io.Serializable;

import cn.com.ege.mvc.exception.BusinessException;
import cn.com.ege.mvc.model.business.Purchase;
import cn.com.ege.mvc.model.business.PurchaseDetail;
import cn.com.ege.mvc.service.BaseService;

public class PurchaseDetailService extends BaseService<PurchaseDetail> implements Serializable{
	public void  save(PurchaseDetail purchaseDetail)throws BusinessException {
		if(null != purchaseDetail ){
			if(null != purchaseDetail.getId() && 0 != purchaseDetail.getId()){
				update(purchaseDetail);
			}
			else{
				add(purchaseDetail);
			}
		}
		else {
			throw new BusinessException("采购单明细ID不能为空");
		}
	}
	
}
